public class Person {

    private String name; // 使用 private 修饰
    private int age; // 使用 private 修饰

    public void eat() {
        System.out.println(this.name + "正在吃饭");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
